<!DOCTYPE html>
<HTML>
 <HEAD>
  <TITLE> ZTREE DEMO </TITLE>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <link rel="stylesheet" href="./css/demo.css" type="text/css">
  <link rel="stylesheet" href="./css/zTreeStyle/zTreeStyle.css" type="text/css">
  <script type="text/javascript" src="./js/jquery-1.4.4.min.js"></script>
  <script type="text/javascript" src="./js/jquery.ztree.core.js"></script>
 </HEAD>
<BODY>
<div>
   <div id="ceshi">

   </div>

   <ul id="treeDemo" class="ztree"></ul>

 <script>
  let zTreeObj;
  // zTree 的参数配置，深入使用请参考 API 文档（setting 配置详解）
  let setting = {};
  // zTree 的数据属性，深入使用请参考 API 文档（zTreeNode 节点数据详解）
  let zNodes;
  let url = "http://localhost/category/findCategory";
  let params = "";
  $.get(url, params, function (result) {
   zNodes= JSON.stringify(result)
   console.log(result);
   $("#ceshi").html(result);
  }, "text");



  $(document).ready(function(){
   zTreeObj = $.fn.zTree.init($("#treeDemo"), setting, zNodes);
  });

 </script>
</div>
</BODY>
</HTML>